import java.util.Scanner;
class Calculate {
    int count(int m, int n) {
        if (m == 1)
            return n;
        else if (m == 0 || m == n)
            return 1;
        else if (n >m && m > 1 && n > 1)
            return count(m - 1, n - 1) + count(m, n - 1);
        else return -1;
    }
}
public class Iteration {
    public static void main(String[] args) {
        //读入输入的m、n值
        Scanner input = new Scanner(System.in);
        System.out.println("please input m:");
        int n=input.nextInt();
        System.out.println("please input n：");
        int m=input.nextInt();
        Calculate a =new Calculate();
        //对输入进行合法性校验
        if (a.count(m,n)==-1)
            System.out.println("error！");
        else
            System.out.println("C(m,n)="+a.count(m,n));
    }
}
